<div class="l-segment l-border-0 example-layout">
    <h3>表单组件</h3>
    <div class="l-divider-50"></div>
    <div class="l-row-padding">
        <div class="l-col-2 m-input">
            <label for="">日期</label>
            <input type="text" date='dateFmt:"yyyy-MM"' class="m-date">
        </div>
        <div class="l-col-2 m-input">
            <label for="">输入项</label>
            <input type="text">
        </div>
        <div class="l-col-2 m-input">
            <label for="">输入项</label>
            <input type="text">
        </div>
        <div class="l-col-2 m-input">
            <label for="">输入项</label>
            <input type="text">
        </div>
        <div class="l-col-2 m-input">
            <label for="">输入项</label>
            <input type="text">
        </div>
        <div class="l-col-2 m-input">
            <label for="">输入项</label>
            <input type="text">
        </div>
    </div>
    <div class="l-row">
        <div class="l-col-1 m-input">
            <label for="">变量1</label>
            <span edit='url:"./sea-modules/zxl/ajax/edit.json",reg:/^(-?)+[0-9]+(.[0-9]{1,2})?$/,error:console.info,errorClass:"editError",name:"name",class:"asdf",style:"background:#fff;color:#000;",after:console.info,valueToLabel:valueToLabel,valueToInput:valueToInput' class="x-layout">10</span>
        </div>
    </div>
    <div class="l-row-padding">
        <div class="l-col-1 m-input l-ml-10">
            <input type="submit" value="提交" class="m-button m-submit">
        </div>
        <div class="l-col-1 m-input">
            <input type="reset" value="重置" class="m-button-default m-reset">
        </div>
    </div>
    <br>
</div>
<script>
    function valueToLabel(num) {
        if (!num || num == 0) return '';
        return (Number(num).toFixed(2) + '').replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,');
    }

    function valueToInput(num) {
        return (num + '').replace(/,/g, '');
    }
</script>